import { mapGetters } from "vuex"
export default {
  computed:{
    ...mapGetters('cartStore',['selectNum'])
  },
  watch:{
    selectNum:{
      immediate:true,
      handler(newval){ 
        uni.setTabBarBadge({
          index:2,
          text:newval+''
        })
      }
    }
  },
  onShow(){
    uni.setTabBarBadge({
      index:2,
      text:this.selectNum+''
    })
  }
}